﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace JXT.PrimaryKey.Batman.Domain.Repositories.Quotation
{
    [StructLayout(LayoutKind.Sequential)]
    public struct TimeSharingQuoteStruct
    {
        /// <summary>
        /// 更新时间
        /// </summary>
        public long UpdateTime;

        /// <summary>
        /// 交易所类型
        /// </summary>
        public byte MarketType;

        /// <summary>
        /// 证券代码
        /// </summary>
        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
        public string Code;

        /// <summary>
        /// 开盘价
        /// </summary>
        public double OpenPrice;

        /// <summary>
        /// 收盘价
        /// </summary>
        public double ClosePrice;

        /// <summary>
        /// 最新价
        /// </summary>
        public double LastPrice;

        /// <summary>
        /// 均价
        /// </summary>
        public double AveragePrice;

        /// <summary>
        /// 最高价
        /// </summary>
        public double HighestPrice;

        /// <summary>
        /// 最低价
        /// </summary>
        public double LowestPrice;

        /// <summary>
        /// 成交量
        /// </summary>
        public long TradingVolume;

        /// <summary>
        /// 成交额
        /// </summary>
        public double Turnover;

        /// <summary>
        /// 交易笔数
        /// </summary>
        public uint TradingNum;

        /// <summary>
        /// 涨跌
        /// </summary>
        public double ChangePrice;

        /// <summary>
        /// 涨跌率
        /// </summary>
        public double ChangeRate;
    }
}
